package com.abdulaziz.ms.ocv.ms.model;

import org.eclipse.jface.viewers.LabelProvider;

import com.abdulaziz.ms.OCV.UMLClass;
import com.abdulaziz.ms.OCV.UMLClassDiagram;
import com.abdulaziz.ms.OCV.UMLVariable;

public class UMLDiagramLabelProvider extends LabelProvider {
	
	public String getText(Object element) {
		if (element instanceof UMLClassDiagram) {
			
			
			return "Classes";
			/*
			if (((UMLClassDiagram) element).getName() == null) {
				return "Classes";
			} else {
				return ((UMLClassDiagram) element).getName();
			}
			*/
		} else if (element instanceof UMLClass) {
			return ((UMLClass) element).getClassName();
		}
		else if (element instanceof UMLVariable) {
			return ((UMLVariable) element).getVariableName();
		}
		return null;

	}

}
